<?php
include("./include/config.inc.php");
$q = strtolower($_GET["q"]);
if (!$q) return;
$selParty = "SELECT partyId, partyName FROM party WHERE partyName REGEXP '^$q'";
$selPartyRes = mysql_query($selParty);
while($pRow = mysql_fetch_array($selPartyRes)) 
{
	echo $pRow['partyName'].'|'.$pRow['partyId'].'|'.$pRow['partyName']."\n";
}
?>